<div class="server" [class.expanded]="isEditing()">
    <div class="header">
        <div class="expand" (click)="toggle()">
            <span class="fa fa-angle-right" [class.fa-angle-down]="isEditing()"></span>
        </div>
        <div class="url" (click)="toggle()" [class.empty]="!hasUrl()">
            <validation-problem [model]="item"></validation-problem>
            <span class="pficon pficon-server entity-icon"></span>
            <span server-url [url]="item.url"></span>
        </div>
        <div class="description" (click)="toggle()">
            <markdown-summary [data]="description()" emptyText="No description."></markdown-summary>
        </div>
        <div class="actions">
            <div class="dropdown dropdown-kebab-pf">
                <button class="btn btn-link dropdown-toggle" type="button" (click)="$event.preventDefault()"
                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span class="fa fa-ellipsis-v"></span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li><a (click)="edit()"><span class="fa fa-fw fa-pencil-square-o"></span><span>Edit</span></a></li>
                    <li role="separator" class="divider"></li>
                    <li><a (click)="delete()"><span class="fa fa-fw fa-trash"></span><span>Delete</span></a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="body" *ngIf="isEditing()">
        <div class="content container-fluid">
            <form  class="form-horizontal">
                <div class="col-md-11">
                    <div class="server-description">
                        <div class="form-label">Description</div>
                        <inline-markdown-editor [value]="item.description" [noValueMessage]="'Enter description here.'"
                                                [baseNode]="item" nodePath="description"
                                                (onChange)="setDescription($event)"></inline-markdown-editor>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
